﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FacultyExample
{
    class Faculty
    {
        public string Name;
        public List<Department> departments = new List<Department>();

        public static int facultyCount=0;

        public static Faculty GenerateRandomFaculty()
        {
            facultyCount++;
            Faculty faculty = new Faculty();
            faculty.Name = "Faculty" + Faculty.facultyCount;
            for (int i = 0; i < 2; i++)
            {
                Department department = Department.GenerateRandomDepartment();
                faculty.departments.Add(department);
            }
            return faculty;
        }

        public void PrintFacultyToConsole()
        {
            Console.WriteLine(Name);
            foreach (var department in departments)
            {
                department.PrintDepartmentToConsole();
                Console.WriteLine();
            }

        }

    }
}
